Release 10.1A: OpenEdge Development:
ADM and SmartObjects
Custom class files
The custom class files for a given ADM class are built into the class. These files contain a structure for the required application logic, as well as instructions for adding this code. The following list describes the custom class files, including for each file the filename format, the file type, and a discussion of the types of changes you can make with the file:
- Custom primary include file (filename:
prim-incl-filecustom.i) — This include file is referenced in the standard primary include file. It contains the code to start the custom super procedure. This code is initially commented out; you must uncomment it manually once you develop your custom super procedure. You also can use this file to initialize properties.- Custom property file (filename:
prop-filecustom.i) — This include file is referenced in the standard property include file. It allows you to extend the behavior of the class by defining new properties.- Custom super procedure (filename:
super-proccustom.p) — This structured procedure file is referenced (instantiated) in the custom primary include file. It allows you to define internal functions and procedures to support new properties in the custom property file (that is, to define new behavior), and generally to extend or override the standard behavior of the class it belongs to:
- To extend the standard behavior of a class, create a local version of a standard function that contains the statement
SUPER( )or procedure that contains the statementRUNSUPER, then add code lines before and/or after theRUNSUPERstatement that provide additional behavior before and/or after the standard behavior.- To override a particular behavior, remove the standard behavior by defining an
EXCLUDE-{proc-or-func-name}preprocessor value in the custom exclude definitions file for this class. This causes the removal of the corresponding procedure or function from the standard super procedure file. You then define in the custom super procedure a procedure or function of your own that has the same name as the procedure or function that you are overriding. (The custom exclude definitions file is described later in this section.) Be sure to include theRUNSUPERorSUPER( )statement if the procedure or function that you are placing has it.- Custom prototype file (filename:
proto-filecustom.i) — This include file is referenced in the custom property include file. It allows you to define the function and procedure prototypes to match the internal entries of the custom super procedure. These prototypes allow an Open4GL client (for example, a Java client) to identify the entry points of the corresponding SmartObject.- Custom exclude definition file (filename:
class-nameexclcustom.i)— This include file is referenced in the standard super procedure file. It allows you to exclude procedures and/or functions by defining anEXCLUDE-{proc-or-func-name}preprocessor value. Each internal entry in a super procedure file is enclosed by special preprocessor code that checks for the existence of a correspondingEXCLUDE-{proc-or-func-name}preprocessor value and removes the procedure or function from the compilation. You typically exclude a procedure or function so that you can rewrite it in the custom super procedure. TheEXCLUDEmechanism is available not only for super procedures but also for any standard structured procedure created in the AppBuilder.The standard class files do not contain a file corresponding to the custom exclude definition file.
- Custom instance definition file (filename:
class-namedefscustom.i) — This include file is referenced in the standard property include file. It allows you to modify the list of instance properties for the class, usually by adding properties. You can also use it to change the instance Properties dialog itself, by specifying the filename of a different instance properties dialog box.The standard class files do not contain a file corresponding to the custom instance definition file.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |